using GameFramework.Resource;
using GameFramework.Scene;
using System.Collections;
using System.Collections.Generic;
using System.Resources;
using UnityEngine;

namespace Map
{
    public enum FloorEnum
    {
        FirstFloor = 0,
        SecondFloor = 1,
        UnderFloor = 2,
        Yard = 3,
    }
    public class MapFloorUnit
    {
        public int X
        {
            get { return m_x; }
            set { m_x = value; }
        }
        public int Y
        {
            get { return m_y; }
            set { m_y = value; }
        }

        private int m_x;
        private int m_y;

        public FloorEnum Floor;
        public List<MapUnitObj> mapUnitObjList;
        private GameObject UnConfirmBlock;
        private GameObject ConfirmBlock;

        public void InitFloor(FloorEnum floorEnum)
        {

            Floor = floorEnum;

            switch (Floor)
            {
                case FloorEnum.FirstFloor:
                    X = 0;
                    Y = 0;
                    break;
                case FloorEnum.SecondFloor:
                    X = 10;
                    Y = 10;
                    break;
                case FloorEnum.UnderFloor:
                    break;
                case FloorEnum.Yard:
                    break;
                default:
                    break;
            }

            mapUnitObjList = new List<MapUnitObj>();
            InitConfirmUnit();
            InitUnConfirmUnit();
        }

        private void InitConfirmUnit()
        {
            MapUnitObj mapUnitObj = new MapUnitObj();
            DirectionEnum[] dirs = new DirectionEnum[] { DirectionEnum.Up, DirectionEnum.Left, DirectionEnum.Down, DirectionEnum.Right };
            //GameObject go = ResourceManager.Load
            //mapUnitObj.InitUnitObj((int)Floor, X, Y, dirs);

            mapUnitObjList.Add(mapUnitObj);
        }

        private void InitUnConfirmUnit()
        {

        }
    }
}

